package org.firebug.generator.client.feign;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;

/**
 * 雪花主键生成器
 */
@FeignClient(name = "generator-micro", path= "/generator-micro")
public interface SnowflakeFeign {
    /**
     *  获取1个主键
     */
    @RequestMapping(value = "/snowflake/get", method = {RequestMethod.GET})
     long get();

    /**
     *  获取{count}个主键
     */
    @RequestMapping(value = "/snowflake/get/{count}", method = {RequestMethod.GET})
    List<Long> get(@PathVariable("count") int count);
}
